<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Myprofile extends CI_Controller {
	private $data = array();
	function __construct()
	{
		parent::__construct();
		if($this->sessionfunctions->isLogedIn() === FALSE)	{
			redirect(base_url()."home/");
		}
		$this->load->model('process_data');
		
		
		$rs =  $this->process_data->get_job_role();
		$list_jobRole = array(0 => "Select your job role");
		foreach ($rs as $val){
			$list_jobRole[$val['id']] = $val['name'];
		}
		$this->data['list_jobRole'] = $list_jobRole;


		$rs =  $this->process_data->get_organization_type();
		$list_organizationType = array(0 => "Select your organization type");
		foreach ($rs as $val){
			$list_organizationType[$val['id']] = $val['name'];
		}
		$this->data['list_organizationType'] = $list_organizationType;



		$rs =  $this->process_data->get_area_of_interest();
		$list_areaOfInterest = array();
		foreach ($rs as $val){
			$list_areaOfInterest[$val['id']] = $val['name'];
		}
		$this->data['list_areaOfInterest'] = $list_areaOfInterest;



		$rs =  $this->process_data->get_det_country();
		$list_country = array();
		foreach ($rs as $val){
			$list_country[$val['id']] = $val['name'];
		}
		$this->data['list_country'] = $list_country;
	}
	public function index()	{
		redirect(base_url()."myprofile/myuploads/");
	}

	public function myuploads()	{
		
		$this->load->model('searchlist');

		$data['searchList'] = $this->searchlist->get_search_listForUser($this->sessionfunctions->getSessionUserId());
		$data['mainSubjects'] = $this->process_data->get_main_subjects();
		$data['subjects'] = $this->process_data->get_subjects();
		$data['approval_status'] = $this->process_data->get_approval_status();
		$data['curr_mainSubject'] = 0;
		
		$data['activeClass'] = "Uploads";
		$data['showAdvanceDet'] = "showAdvanceDet";
		$this->load->view('myuploads', $data);
	}
	

	public function mydetails()	{
		$data['activeClass'] = "Details";
		$this->load->view('mydetails', $data);
	}
	
	public function mysettings()	{
		$data = $this->data;
		$data['activeClass'] = "Settings";
		$data['authorDetail'] = $this->process_data->usersFullDetails_Id($this->sessionfunctions->getSessionUserId());
		$this->load->view('mysettings', $data);
	}
	
	public function myactivity()	{
		$data['activeClass'] = "Activity";
		$this->load->view('myactivity', $data);
	}
	
	
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */